package com.swyc.osschat.Test.designMode.builder.impl;

import com.swyc.osschat.Test.designMode.builder.base.Builder;
import com.swyc.osschat.Test.designMode.builder.run.Computer;

/**
 * @description 具体建造者
 * @Author: z156940l@outlook.com
 * @className ComputerBuilder
 * @Date: 2022/7/25 18:02
 */
public class ComputerBuilder extends Builder {
    //通过具体建造者 设置产品的属性
    @Override
    public void buildMainBoard(String mainBoard) {
        computer.setMainBoard("主板："+mainBoard);
    }

    @Override
    public void buildCpu(String cpu) {
        computer.setCpu("cpu："+cpu);
    }

    @Override
    public void buildRam(String ram) {
        computer.setRam("ram："+ram);
    }

    @Override
    public Computer build() {
        return computer;
    }
}